package com.woniuxy.controller;

import com.woniuxy.entity.Loginmsg;
import com.woniuxy.service.LoginmsgService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.Date;
import java.util.List;

/**
 * (Loginmsg)表控制层
 *
 * @author
 * @since 2021-02-24 16:02:03
 */
@RestController
@RequestMapping("loginmsg")
public class LoginmsgController {
    /**
     * 服务对象
     */
    @Resource
    private LoginmsgService loginmsgService;

    /**
     * 查询所有数据
     *
     * @param
     * @return 全部数据
     */
    @GetMapping("selectAll")
    public List<Loginmsg> selectAll() {
        return this.loginmsgService.queryAll();
    }

    /**
     * Description : TODO  <br/>
     * ChangeLog : 1. 创建 (2021/2/24 17:00 [Li]);
     * @param timeOne 
     * @param timeTwo  
     * @return java.util.List<com.woniuxy.entity.Loginmsg>
    */
    @GetMapping("selectByTime")
    public List<Loginmsg> selectByTime(@RequestParam Date timeOne,Date timeTwo) {
        return this.loginmsgService.queryByTime(timeOne,timeTwo);
    }

    /**
     * Description :   <br/>
     * ChangeLog : 1. 创建 (2021/2/24 17:10 [Li]);
     * @param loginmsg  
     * @return int
    */
    @GetMapping("insert")
    public int insert(Loginmsg loginmsg) {
        return this.loginmsgService.insert(loginmsg);
    }
}